package com.wwl.myrule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import com.netflix.loadbalancer.RoundRobinRule;
import com.netflix.loadbalancer.WeightedResponseTimeRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author wwl
 * @version 1.0
 * @date 2021/8/9 19:45
 * @description:
 */
@Configuration
public class MySelfRule {
    @Bean
    public IRule myRule(){
        return new RoundRobinRule();//定义为随机
    }
}
